/** @jsxImportSource @emotion/react */
import * as React from "react";
import {OriginalViewProps} from "../../common/base";
import {config设备概况, EntranceSetup, Projects默认, tail附页} from "./orcBase";
import {createItem,} from "../../common/eHelper";
import {useRecordListSubr} from "../../hook/useRecordListSub";
import {DeviceSurvey} from "../../elevator/editor";
import {AppendixPage, } from "./AppendixPage";
import {ProjectListMvs} from "../../movable/Projects";
import {ConclusionOxygen} from "./Conclusion";


const recordPrintList =[
  createItem('Entrance', <EntranceSetup/>),
  createItem('ProjectList', <ProjectListMvs  projects={Projects默认}/>),
  createItem('Survey', <DeviceSurvey config={config设备概况} label={'检验结论报告-设备概况'}/>),

  createItem('Conclusion', <ConclusionOxygen label={'检验结论报告-下结论'}/>),
  createItem('AppendixPage', <AppendixPage label={'氧舱定期检验报告附页（上）'} children={tail附页}/>),
  createItem('ApxIspItms_20', <AppendixPage part={2} label={'氧舱定期检验报告附页（下）'} children={tail附页}/>),

  createItem('_Controller',  <></>),
];


export const OriginalView=
  React.forwardRef((
    { action: modAction,  verId, repId='', rep}
    :OriginalViewProps, ref
  ) => {
    const {list}=useRecordListSubr(ref,rep,recordPrintList,modAction,verId);
    return <React.Fragment>
      {list}
    </React.Fragment>;
  } );
